class Phone:
    IMEI = None
    producer = "xiaomi"

    def call_by_4g(self):
        print("4g通话")


class Phone2022(Phone):
    face_id = "20221010"

    def call_by_4g(self):
        print("子类的4g通话")

    def call_by_5g(self):
        print("2022新功能：5g通话")


phone = Phone2022()
# print(phone.producer)
phone.call_by_4g()
phone.call_by_5g()


# 演示多继承
class NFCReader:
    nfc_type = "第六代"
    producer = "huawei"

    def write(self):
        print("写NFC")

    def read(self):
        print("读NFC")


class RemoteControl:
    rc_type = "红外遥控器"

    def control(self):
        print("红外遥控开启了")


class Phone2023(Phone, NFCReader, RemoteControl):
    pass


myPhone = Phone2023()
myPhone.call_by_4g()
myPhone.write()
myPhone.read()
myPhone.control()
print(myPhone.producer)
